package com.jerry.huihome.module.home.adapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import com.jerry.huihome.base.BaseFragment;
import com.jerry.huihome.module.home.fragment.LiveAllFragment;

import java.util.HashMap;
import java.util.Map;

/**
 * Created by LGuipeng on 2016/5/12.
 */
public class LiveAdapter extends FragmentPagerAdapter{

    public LiveAdapter(FragmentManager fm){
        super(fm);
    }

    @Override
    public Fragment getItem(int position){
        Map<String,String> params = new HashMap<>();
        params.put("cate",position + "");
        return BaseFragment.newInstance(LiveAllFragment.class,params);
    }
    private String [] title = {"我的"," | 大家的 | ","关注的"};
    @Override
    public CharSequence getPageTitle(int position){
        return title[position];
    }

    @Override
    public int getCount(){
        return title.length;
    }
}
